LassoScript Utility
Basics Browse Detail

[String->ToTitle]

Tag Link [String->ToTitle] Category String
Type Member Source Available Yes
Support Preferred Version 7.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Description

[String->ToTitle] modifies the base string in-place by converting the specified character to titlecase. Requires a single parameter, which indicates the position of the character to change.

Syntax

[Variable: 'myString' = 'String Value']
[$myString->(ToTitle: Integer)]
[Variable: 'myString']

<?LassoScript
Variable: 'myString' = 'String Value';
$myString->(ToTitle: Integer)]
Output: $myString;
?>

Parameters

Required Parameters
Integer Indicates the position of the character to change. The first character in the base string is 1.

Examples

To change the case of a string to title case:

Use the [String->ToTitle] tag. The following example outputs a sample string converted to title case.

[Variable: 'myString' = 'a quick brown fox']
[$myString->(ToTitle: 1)]
[Output: $myString]

A quick brown fox

Related Tags

Category Tags